#include <bits/stdc++.h>
using namespace std;

// #define ONLINE_JUDGE

#ifndef ONLINE_JUDGE
#define dbg(x...) { cerr << "\033[32;1m" << #x << " -> "; err(x); }
void err() { cerr << "\033[39;0m" << endl; }
template<typename T, typename... A>
void err(T a, A... x) { cerr << a << ' '; err(x...); }
#else
#define dbg(...)
#endif

typedef long long LL;

int main(int argc, char const *argv[])
{
	int t;
	scanf("%d", &t);
	for (int kk=0; kk<t; ++kk)
	{
		int n, d;
		scanf("%d%d", &n, &d);
		int x = sqrt(d);
		const int S = 10000;
		int st = max(0, x-S), ed = min(n, x+S);
		int ans = n + 1;
		// dbg(st, ed);
		for (int xx=st; xx<=ed; ++xx)
		{
			ans = min(ans, xx + (d + xx) / (xx + 1));
		}
		// dbg(ans, n);
		if (ans <= n) puts("YES");
		else puts("NO");
	}	
	return 0;
}